package com.example.cacheredis;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;

@SpringBootApplication
@MapperScan(basePackages = "com.example.cacheredis.mapper")
@EnableCaching
/**
 * 必须要使用 @EnableCaching 注解，否则 SimpleCacheConfiguration RedisCacheConfiguration 都匹配上，完成自动配置
 * 且无法缓存
 */
public class CacheRedisApplication {

	public static void main(String[] args) {
		SpringApplication.run(CacheRedisApplication.class, args);
	}

}
